<template>
  <vue-tab current="certificate"></vue-tab>
  <div class="sec-top row">
    <form class="form-inline col-sm-8" @submit.prevent="getList">
      <div class="form-group form-group-sm">
        <label>手机号:</label>
        <input type="text" class="form-control" v-model="phone" placeholder="">
        <input type="submit" class="btn btn-sm btn-primary" value="搜索">
      </div>
    </form>
    <span class="import-excel">
      <vue-user-excel :show-code-excel.sync="showCodeExcel"></vue-user-excel>
    </span>
  </div>
  <table class="table table-bordered table-hover">
    <caption>用户列表</caption>
    <thead>
      <tr>
        <th>customerid</th>
        <th>手机号</th>
        <th>券商</th>
        <th>状态</th>
        <th>交易证券</th>
        <th>场内证券代码</th>
        <th>创建时间</th>
        <th>更新时间</th>
        <th>发放凭证</th>
        <th>重新发放</th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="item in userList">
        <td>{{item.userId}}</td>
        <td>{{item.phone}}</td>
        <td>{{item.tradeId}}</td>
        <td>{{item.status}}</td>
        <td>{{item.stockName}}</td>
        <td>{{item.stockCode}}</td>
        <td>{{item.createTime}}</td>
        <td>{{item.updateTime}}</td>
        <td>{{item.certificate}}</td>
        <td class="text-right">
          <button v-if="item.certificate === '是'" class="btn btn-sm btn-primary" @click="reSent(item)">重新发放</button>
        </td>
      </tr>
    </tbody>
  </table>
  <vue-pages :pages.sync="pages" :get-list="getList"></vue-pages>
</template>
<script src="./certificate-user-list.js"></script>
<style src="./certificate-user-list.css" scoped></style>
